package kgc.crm.controller;

import kgc.crm.annotation.UserPower;
import kgc.crm.annotation.VerificationToken;
import kgc.crm.enums.PowerEnum;
import kgc.crm.service.IContractService;
import kgc.crm.util.ResultUtil;
import kgc.crm.vo.ContractVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("cont")
@CrossOrigin
/*合同控制器*/
public class ContractController {
    @Autowired
    private IContractService contractService;

    /*查询合同*/
    @UserPower(power = PowerEnum.INDEX)
    @VerificationToken
    @GetMapping("list")
    public ResponseEntity listAndPage(@RequestBody ContractVo vo){
        return contractService.listAndPage(vo);
    }
}
